<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page database.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/includes/database/database.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
									<a href="#sec-includes">Includes</a>
			|							<a href="#sec-constants">Constants</a>
			|									<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
		
			</div>
</div>
		

	<a name="sec-includes"></a>	
	<div class="info-box">
		<div class="info-box-title">Includes</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Includes</span>
			|							<a href="#sec-constants">Constants</a>
				|													<a href="#sec-functions">Functions</a>
					</div>
		<div class="info-box-body">	
			<a name="_/var/www/gde-1_0/htdocs/config_php"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">'/var/www/gde-1.0/htdocs/config.php'</span>)
			(line <span class="line-number">22</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_Config::base_path_Config::adodb_path_adodb-exceptions_inc_php"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">Config::base_path.Config::adodb_path."adodb-exceptions.inc.php"</span>)
			(line <span class="line-number">26</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_Config::base_path_Config::adodb_path_adodb_inc_php"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">Config::base_path.Config::adodb_path."adodb.inc.php"</span>)
			(line <span class="line-number">24</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_Config::base_path_Config::adodb_path_adodb-pager_inc_php"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">Config::base_path.Config::adodb_path.'adodb-pager.inc.php'</span>)
			(line <span class="line-number">28</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
		</div>
	</div>
	
	<a name="sec-constants"></a>	
	<div class="info-box">
		<div class="info-box-title">Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-includes">Includes</a>
				|						<span class="disabled">Constants</span>
			|										<a href="#sec-functions">Functions</a>
					</div>
		<div class="info-box-body">	
			<a name="defineBACKEND"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="const-title">
			<span class="const-name">BACKEND</span> = 
			(line <span class="line-number">35</span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Defined variables to indicate where to connect to find the database</p>
<p class="description"><p>BACKEND - sends the query to the database constants defined in the config.php</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
		
</div>
<a name="defineDOMAIN_SPECIFIC"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="const-title">
			<span class="const-name">DOMAIN_SPECIFIC</span> = 1
			(line <span class="line-number">42</span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Defined variables to indicate where to connect to find the database  DOMAIN_SPECIFIC - sends the query to the database defined by the users login information.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
		
</div>
		</div>
	</div>
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-includes">Includes</a>
				|										<a href="#sec-constants">Constants</a>
				|									<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functiondb_connect" id="functiondb_connect"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">db_connect</span> (line <span class="line-number">56</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Makes a Non-persistent connect to data source or server with exceptions</p>
	<ul class="tags">
				<li><span class="field">return:</span> object - adodb Non-persistent connect to data source</li>
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">adodb</span>
		<span class="method-name">
			db_connect
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$dbtype</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbhost</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbusername</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbpassword</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbdatabase</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$error_s</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbtype</span><span class="var-description">: - type of database, mysql,db2,oracle etc</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbhost</span><span class="var-description">: - host location, localhost, myserver:3062, 127.0.0.1, etc</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbusername</span><span class="var-description">: - username for the database connection</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbpassword</span><span class="var-description">: - password for the username database connection</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbdatabase</span><span class="var-description">: - name of the database to connect to</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$error_s</span><span class="var-description">: - 0 for no exceptions, 1 for exceptions to stdout</span>			</li>
				</ul>
		
	
</div>
<a name="functiondb_pconnect" id="functiondb_pconnect"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">db_pconnect</span> (line <span class="line-number">94</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Makes a Persistent connect to data source or server with exceptions</p>
	<ul class="tags">
				<li><span class="field">return:</span> object - adodb Non-persistent connect to data source</li>
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">adodb</span>
		<span class="method-name">
			db_pconnect
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$dbtype</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbhost</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbusername</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbpassword</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dbdatabase</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$error_s</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbtype</span><span class="var-description">: - type of database, mysql,db2,oracle etc</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbhost</span><span class="var-description">: - host location, localhost, myserver:3062, 127.0.0.1, etc</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbusername</span><span class="var-description">: - username for the database connection</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbpassword</span><span class="var-description">: - password for the username database connection</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dbdatabase</span><span class="var-description">: - name of the database to connect to</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$error_s</span><span class="var-description">: - 0 for no exceptions, 1 for exceptions to stdout</span>			</li>
				</ul>
		
	
</div>
<a name="functiondescribeDatabase" id="functiondescribeDatabase"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">describeDatabase</span> (line <span class="line-number">162</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">describeDatabase - obtains desciption of a datbase</p>
	<ul class="tags">
				<li><span class="field">return:</span> resultset object containg the result</li>
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">adodb</span>
		<span class="method-name">
			describeDatabase
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$databaseName</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$table</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$databaseName</span><span class="var-description">: - name of databse</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$table</span><span class="var-description">: - name of table</span>			</li>
				</ul>
		
	
</div>
<a name="functiondoQuery" id="functiondoQuery"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">doQuery</span> (line <span class="line-number">133</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Peforms a query without having to make a seperate database connection decoupling the backend  from the domain specific queries</p>
	<ul class="tags">
				<li><span class="field">return:</span> resultset object containg the result</li>
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">adodb</span>
		<span class="method-name">
			doQuery
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$connection_type</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$FETCH_MODE</span> = <span class="var-default">"ADODB_FETCH_DEFUALT"</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sql</span><span class="var-description">: - Valid SQL statement</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$connection_type</span><span class="var-description">: - sets the connection either to backend or not as well as persistent  or non persistent connection based on DOMAIN_SPECIFIC or BACKEND</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$FETCH_MODE</span><span class="var-description">: - sets the type of resultset returned, ADODB_FETCH_NUM, ADODB_FETCH_ASSOC</span>			</li>
				</ul>
		
	
</div>
<a name="functionrecord2PagingHtml_2" id="functionrecord2PagingHtml_2"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">record2PagingHtml_2</span> (line <span class="line-number">266</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Prints the record set with paginating, similar to record2PagingHtml() only that a database connection  is made in this function making it more versitile.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			record2PagingHtml_2
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$rows_per_page</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span> = <span class="var-default">"self"</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sql</span><span class="var-description">: - SQL query</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$rows_per_page</span><span class="var-description">: - number of rows to pagenate on</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span><span class="var-description">: -  pager object needs a unique ID, If you put more than one pager object in  a page, ADODB_Pager needs to tell them apart so the next and previous links advance the correct pager</span>			</li>
				</ul>
		
	
</div>
<a name="functionresult2array" id="functionresult2array"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">result2array</span> (line <span class="line-number">231</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a adodb resultset object containg the result to an array</p>
	<ul class="tags">
				<li><span class="field">return:</span> with all the query results</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			result2array
		</span>
					(<span class="var-type">adodb</span>&nbsp;<span class="var-name">$result</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">adodb</span>
				<span class="var-name">$result</span><span class="var-description">: result object  $result - query returned from valid SQL</span>			</li>
				</ul>
		
	
</div>
<a name="functionselectLimit" id="functionselectLimit"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">selectLimit</span> (line <span class="line-number">192</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Peforms a qeury limiting the number of results, this is acts the same as using LIMIT in SQL but this  function will will work across all database platforms.</p>
	<ul class="tags">
				<li><span class="field">return:</span> resultset object containg the result</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">adodb</span>
		<span class="method-name">
			selectLimit
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$limit</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$connection_type</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$sql</span><span class="var-description">: - SQL Query</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$limit</span><span class="var-description">: - maximum number of records to be returned</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$connection_type</span><span class="var-description">: - sets the connection either to backend or not as well as persistent  or non persistent connection based on DOMAIN_SPECIFIC or BACKEND</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Fri, 20 Oct 2006 00:33:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>